c# count files in directory and subdirectories

279

c# count files in directory and subdirectories -

var countFiles = System.IO.Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories).Count();

c# count directories in directory and subdirectories -

var countDirectories = System.IO.Directory.GetDirectories(sourcePath, "*", SearchOption.AllDirectories).Count();

Comments

Submit
0 Comments